package com.boe.csb.core.common.status;


import java.util.HashMap;
import java.util.Map;

/**
 * Created by tianxiang.luo on 16/11/27.
 */
public enum AdminUserRole {

    ACCOUNT_MANAGER("account_manager","账号管理"),
    CATEGORY_MANAGER("category_manager","类目管理"),
    AUDIT_SERVICE("audit_service","服务发布审批"),
    USER_REGISTER("user_register","用户注册审批"),
    VIEW_LOG("view_log","查看日志");

    private String role;
    private String desc;
    public static String[] allRoles = new String[]{ACCOUNT_MANAGER.getRole(),CATEGORY_MANAGER.getRole(),AUDIT_SERVICE.getRole(),USER_REGISTER.getRole(),VIEW_LOG.getRole()};

    AdminUserRole(String role, String desc){
        this.role = role;
        this.desc = desc;

    }

    public static Map<String,String> map = new HashMap<>();

    static {
        for (AdminUserRole admin:AdminUserRole.values()){
            map.put(admin.getRole(),admin.getDesc());
        }
    }

    public String getRole() {
        return role;
    }

    public void setRole(String role) {
        this.role = role;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }
}
